#ifndef DOC_HPP
#define DOC_HPP

#include <vector>
#include "term.hpp"
#include <iostream>
#include <string>
#include <cmath>

class Doc {
public:
	Doc();
	void addTerm(Term &);
	void print(std::ostream &);
private:
	//probability
	// P(C|X) = P(X|C)*P(C) [divided by P(X) if necessary]
	// P(x[i]|c[j]) = (# of times x[i] appears in c[j])/(# of words in c[j])
	// use log probabilities to avoid underflow
	// pp = P(project|terms)
	// pc = P(course|terms)
	// pf = P(faculty|terms)
	// ps = P(student|terms)
	double pp, pc, pf, ps;
	std::string label;
	std::vector<Term *> terms;
	void update(Term &);
};

#endif